<template>
    <div class="payment">
        <div class="paycontent">
            <div class="title"><span class="leftline"></span><span>支付设置</span></div>
            <el-collapse accordion v-model="activeNames">
                <el-collapse-item name="1">
                    <template slot="title">
                        <i class="el-icon-caret-bottom" v-show = 'activeNames != 1'></i><i class="el-icon-caret-top" v-show = 'activeNames == 1'></i>微信支付通道
                    </template>
                    <el-row class="pass-main-title">
                       <el-col :span="22">
                          <el-row>
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="8">
                                     微信通道状态
                                  </el-col>
                                  <el-col :span="16">
                                    <!-- <el-radio v-model="radio" label="1">关闭</el-radio>
                                    <el-radio v-model="radio" label="2">开启</el-radio> -->
                                    <el-switch
                                      v-model="radioWeixinAll"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                           
                          </el-row>
                       </el-col>      
                    </el-row>
                    <!-- content -->
                    <el-row v-show='radioWeixinAll == true' >
                      <el-row  class="partone bt-line topline">
                       <el-col :span="22">
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   收款状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioWeixin1"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   押金授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioWeixin2"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    撤销预授权(解冻)
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioWeixin3"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   结算状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioWeixin4"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   扫码授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioWeixin5"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   隔日结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioWeixin6"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    短信预授权
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioWeixin7"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    退款
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioWeixin8"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="expirationTimeWeixin" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsRefund"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    追加结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioWeixin9"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="settlementTimeWeixin" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsSettlementWeixin"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                          <el-row  class="pass-main">
                            <el-col :span="10">
                               <el-row>
                                  <el-col :span="9">
                                   当面付授权接口版本
                                  </el-col>
                                  <el-col :span="15">
                                     <el-select v-model="valueversionWeixin" placeholder="请选择">
                                      <el-option
                                        v-for="item in optionsversionWeixin"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                           <el-row class="pass-main">
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="9">
                                    预授权到期处理方式
                                  </el-col>
                                  <el-col :span="15">
                                    <el-radio v-model="radioway10" label="1">全额结算</el-radio>
                                    <el-radio v-model="radioway10" label="2">全额解冻</el-radio>
                                    <el-radio v-model="radioway10" label="3">不处理</el-radio>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                        </el-col>
                      </el-row> 
                      <el-table
                        v-loading="loading"
                        :data="weixinList"
                        stripe
                        style="width: 100%">
                        <el-table-column
                          prop="ways_id"
                          label="通道店铺ID"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="rates"
                          label="费率"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="face_pay_rate"
                          label="当面付费率">
                        </el-table-column>
                        <el-table-column
                          prop="created_at"
                          label="通道创建时间">
                        </el-table-column>
                        <el-table-column
                          prop="updated_at"
                          label="通道更新时间">
                        </el-table-column>
                        <el-table-column>
                          <template slot-scope="scope">
                              <el-radio  v-model="radioweixin" :label="scope.row.ways_id"  @click.native.prevent="selectWayWeixin(scope.row.ways_id)">选用</el-radio>
                          </template>
                        </el-table-column>
                      </el-table>
                      
                  
                    <div class="text-center mt20">暂未开通微信支付通道</div>
                    <div class="text-center bluefont pb20 bt-line"><a href="javascript:;" @click="addwayscase('g_weixin',store_code)">点击前往开通</a></div>
                    <div class="text-center bottom-btn">
                            <el-button size="medium">取消</el-button>
                            <el-button type="primary" size="medium"  @click="modifyWeixin" v-loading.fullscreen.lock="fullscreenLoading1">确定</el-button>
                    </div>
                  </el-row>
                </el-collapse-item>
                 <el-collapse-item name="2">
                    <template slot="title">
                    <i class="el-icon-caret-bottom" v-show = 'activeNames != 2'></i><i class="el-icon-caret-top" v-show = 'activeNames == 2'></i>支付宝通道管理
                     <!-- <div class="text-right set" @click.stop="open3"><img src="./../../public/img/set.png" />设置</div> -->
                    </template>
                     <!-- title -->
                    <el-row class="pass-main-title">
                       <el-col :span="22">
                          <el-row>
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="8">
                                     支付宝通道状态
                                  </el-col>
                                  <el-col :span="16">
                                    <!-- <el-radio v-model="radio" label="1">关闭</el-radio>
                                    <el-radio v-model="radio" label="2">开启</el-radio> -->
                                    <el-switch
                                      v-model="radio"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                           
                          </el-row>
                       </el-col>      
                    </el-row>
                    <!-- content -->
                    <el-row v-show='radio == true' >
                      <el-row  class="partone bt-line topline">
                       <el-col :span="22">
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   收款状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radio1"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   押金授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radio2"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    撤销预授权(解冻)
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radio3"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   结算状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radio4"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   扫码授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radio5"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   隔日结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radio6"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    短信预授权
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radio7"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    退款
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radio8"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="expirationTime" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsRefund"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    追加结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radio9"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="settlementTime" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsSettlement"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                          <el-row  class="pass-main">
                            <el-col :span="10">
                               <el-row>
                                  <el-col :span="9">
                                   当面付授权接口版本
                                  </el-col>
                                  <el-col :span="15">
                                     <el-select v-model="valueversion" placeholder="请选择">
                                      <el-option
                                        v-for="item in optionsversion"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                           <el-row class="pass-main">
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="9">
                                    预授权到期处理方式
                                  </el-col>
                                  <el-col :span="15">
                                    <el-radio v-model="radio10" label="1">全额结算</el-radio>
                                    <el-radio v-model="radio10" label="2">全额解冻</el-radio>
                                    <el-radio v-model="radio10" label="3">不处理</el-radio>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                        </el-col>
                      </el-row> 
                      <el-table
                        :data="apliayList"
                        stripe
                        style="width: 100%">
                        <el-table-column
                          prop="ways_id"
                          label="通道店铺ID"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="rates"
                          label="费率"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="face_pay_rate"
                          label="当面付费率">
                        </el-table-column>
                        <el-table-column
                          prop="created_at"
                          label="通道创建时间">
                        </el-table-column>
                        <el-table-column
                          prop="updated_at"
                          label="通道更新时间">
                        </el-table-column>
                        <el-table-column>
                          <template slot-scope="scope">
                              <el-radio  v-model="radio11" :label="scope.row.ways_id"  @click.native.prevent="selectWay(scope.row.ways_id,scope.row.status)">选用</el-radio>
                          </template>
                        </el-table-column>
                      </el-table>
                       <!-- 新增支付宝通道 -->
                      <el-row class="text-center pass-line bt-line"><span><a href="javascript:;" @click="addwayscase('g_alipay',store_code)">新增支付宝通道</a></span></el-row>
                      <div class="text-center bottom-btn">
                            <el-button size="medium">取消</el-button>
                            <el-button type="primary" size="medium"  @click="modifyAlipay" v-loading.fullscreen.lock="fullscreenLoading2">确定</el-button>
                      </div>
                  </el-row>
                    
                </el-collapse-item>
                 <el-collapse-item name="3">
                    <template slot="title">
                    <i class="el-icon-caret-bottom" v-show = 'activeNames != 3'></i><i class="el-icon-caret-top" v-show = 'activeNames == 3'></i>银行卡通道管理
                    </template>
                                  <el-row class="pass-main-title">
                       <el-col :span="22">
                          <el-row>
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="8">
                                     微信通道状态
                                  </el-col>
                                  <el-col :span="16">
                                    <!-- <el-radio v-model="radio" label="1">关闭</el-radio>
                                    <el-radio v-model="radio" label="2">开启</el-radio> -->
                                    <el-switch
                                      v-model="radioBankAll"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                           
                          </el-row>
                       </el-col>      
                    </el-row>
                    <!-- content -->
                    <el-row v-show='radioBankAll == true' >
                      <el-row  class="partone bt-line topline">
                       <el-col :span="22">
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   收款状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioBank1"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   押金授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioBank2"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    撤销预授权(解冻)
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioBank3"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   结算状态
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioBank4"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   扫码授权
                                  </el-col>
                                  <el-col :span="15">
                                    <el-switch
                                      v-model="radioBank5"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                   隔日结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioBank6"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                          <el-row class="pass-main">
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    短信预授权
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioBank7"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    退款
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioBank8"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="expirationTimeBank" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsRefund"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            <el-col :span="8">
                               <el-row>
                                  <el-col :span="9">
                                    追加结算
                                  </el-col>
                                  <el-col :span="15">
                                     <el-switch
                                      v-model="radioBank9"
                                      active-color="#409EFF"
                                      inactive-color="#ff4949">
                                    </el-switch>
                                    <el-select v-model="settlementTimeBank" placeholder="请选择" class="ml20">
                                      <el-option
                                        v-for="item in optionsSettlementBank"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                          <el-row  class="pass-main">
                            <el-col :span="10">
                               <el-row>
                                  <el-col :span="9">
                                   当面付授权接口版本
                                  </el-col>
                                  <el-col :span="15">
                                     <el-select v-model="valueversionBank" placeholder="请选择">
                                      <el-option
                                        v-for="item in optionsversionBank"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value">
                                      </el-option>
                                    </el-select>
                                  </el-col>
                                </el-row> 
                            </el-col>
                          </el-row>
                           <el-row class="pass-main">
                            <el-col :span="12">
                               <el-row>
                                  <el-col :span="9">
                                    预授权到期处理方式
                                  </el-col>
                                  <el-col :span="15">
                                    <el-radio v-model="radioBank10" label="1">全额结算</el-radio>
                                    <el-radio v-model="radioBank10" label="2">全额解冻</el-radio>
                                    <el-radio v-model="radioBank10" label="3">不处理</el-radio>
                                  </el-col>
                                </el-row>
                            </el-col>
                            
                          </el-row>
                        </el-col>
                      </el-row> 
                      <el-table
                        :data="bankList"
                        stripe
                        style="width: 100%">
                        <el-table-column
                          prop="ways_id"
                          label="通道店铺ID"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="rates"
                          label="费率"
                          width="180">
                        </el-table-column>
                        <el-table-column
                          prop="face_pay_rate"
                          label="当面付费率">
                        </el-table-column>
                        <el-table-column
                          prop="created_at"
                          label="通道创建时间">
                        </el-table-column>
                        <el-table-column
                          prop="updated_at"
                          label="通道更新时间">
                        </el-table-column>
                        <el-table-column>
                          <template slot-scope="scope">
                              <el-radio  v-model="radioBank" :label="scope.row.ways_id"  @click.native.prevent="selectWayBank(scope.row.ways_id)">选用</el-radio>
                          </template>
                        </el-table-column>
                      </el-table>
                   
                    <div class="text-center mt20">暂未开通银行卡通道管理</div>
                    <div class="text-center bluefont pb20 bt-line"><a href="javascript:;" @click="addwayscase('g_sfbank',store_code)">新增银行卡通道</a></div>
                     <div class="text-center bottom-btn">
                            <el-button size="medium">取消</el-button>
                            <el-button type="primary" size="medium"  @click="modifyBank" v-loading.fullscreen.lock="fullscreenLoading3">确定</el-button>
                    </div>
                  </el-row>
                   
                </el-collapse-item>
            </el-collapse>
        </div>
    </div>
</template>

<script>
import api from './../../api/api';
import http from './../../config/index';
export default {
  data () {
    return {
      token: localStorage.getItem('token'),
      fullscreenLoading1: false,
      fullscreenLoading2: false,
      fullscreenLoading3: false,
      // 加载圈
      loading: true,
      store_code: this.$route.query.store_code ? this.$route.query.store_code : '',
      activeNames: ['1'],
      // 支付宝退款过期时间小时
      expirationTime: '1',
      // 支付宝追加结算时间小时
      settlementTime: '',
      // 支付宝通道状态
      radio: false,
      // 支付宝收款状态
      radio1: false,
      // 支付宝押金授权
      radio2: false,
      // 支付宝撤销预授权(解冻)
      radio3: false,
      // 支付宝结算状态
      radio4: false,
      // 支付宝扫码授权
      radio5: false,
      // 支付宝隔日结算
      radio6: false,
      // 支付宝短信预授权
      radio7: false,
      // 支付宝退款
      radio8: false,
      // 支付宝追加结算
      radio9: false,
      // 支付宝预授权到期处理方式
      radio10: '',
      // 支付宝当面付授权接口版本
      valueversion: 'V1',
      // 支付宝单选
      radio11: '',
      // 支付宝退款时间
      optionsRefund: [{
        value: '1',
        label: '1小时内(默认)'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '选项5',
        label: '48小时内'
      }],
      // 支付宝追加结算时间
      optionsSettlement: [{
        value: '1',
        label: '1小时'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '4',
        label: '4小时内'
      }, {
        value: '5',
        label: '5小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '7',
        label: '7小时内'
      }, {
        value: '8',
        label: '8小时内'
      }, {
        value: '9',
        label: '9小时内'
      }, {
        value: '10',
        label: '10小时内'
      }, {
        value: '11',
        label: '11小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '48',
        label: '48小时内'
      }],
      // 支付宝当面付授权接口版本
      optionsversion: [{
        value: 'V1',
        label: 'V1'
      }, {
        value: 'V2',
        label: 'V2'
      }, {
        value: 'V3',
        label: 'V3'
      }],
      // 支付通道列表
      apliayList: [],
      // 微信单选
      radioweixin: '',
      // 微信支付通道状态
      radioWeixinAll: false,
      // 微信退款过期时间小时
      expirationTimeWeixin: '1',
      // 微信追加结算时间小时
      settlementTimeWeixin: '',
      // 微信收款状态
      radioWeixin1: false,
      // 微信押金授权
      radioWeixin2: false,
      // 微信撤销预授权(解冻)
      radioWeixin3: false,
      // 微信结算状态
      radioWeixin4: false,
      // 微信扫码授权
      radioWeixin5: false,
      // 微信隔日结算
      radioWeixin6: false,
      // 微信短信预授权
      radioWeixin7: false,
      // 退款
      radioWeixin8: false,
      // 微信追加结算
      radioWeixin9: false,
      // 预授权到期处理方式
      radioway10: '',
      // 微信支付通道内容数据
      paywaysList: '',
      // 微信微信通道内容数据
      payweixinList: '',
      // 微信当面付授权接口版本默认值
      valueversionWeixin: 'V1',
      // 微信通道列表
      weixinList: [],
      // 微信退款时间
      optionsRefundWeixin: [{
        value: '1',
        label: '1小时内(默认)'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '选项5',
        label: '48小时内'
      }],
      // 微信追加结算时间
      optionsSettlementWeixin: [{
        value: '1',
        label: '1小时'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '4',
        label: '4小时内'
      }, {
        value: '5',
        label: '5小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '7',
        label: '7小时内'
      }, {
        value: '8',
        label: '8小时内'
      }, {
        value: '9',
        label: '9小时内'
      }, {
        value: '10',
        label: '10小时内'
      }, {
        value: '11',
        label: '11小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '48',
        label: '48小时内'
      }],
      // 微信当面付授权接口版本
      optionsversionWeixin: [{
        value: 'V1',
        label: 'V1'
      }, {
        value: 'V2',
        label: 'V2'
      }, {
        value: 'V3',
        label: 'V3'
      }],
      // 银行卡单选
      radioBank: '',
      // 银行卡支付通道状态
      radioBankAll: false,
      // 银行卡退款过期时间小时
      expirationTimeBank: '1',
      // 银行卡追加结算时间小时
      settlementTimeBank: '',
      // 银行卡收款状态
      radioBank1: false,
      // 银行卡押金授权
      radioBank2: false,
      // 银行卡撤销预授权(解冻)
      radioBank3: false,
      // 银行卡结算状态
      radioBank4: false,
      // 银行卡扫码授权
      radioBank5: false,
      // 银行卡隔日结算
      radioBank6: false,
      // 银行卡短信预授权
      radioBank7: false,
      // 退款
      radioBank8: false,
      // 银行卡追加结算
      radioBank9: false,
      // 银行卡当面付授权接口版本
      radioBank10: '',
      // 银行卡当面付授权接口版本默认值
      valueversionBank: 'V1',
      // 微信微信通道内容数据
      payBankList: '',
      // 银行卡通道列表
      bankList: [],
      // 银行卡退款时间
      optionsRefundBank: [{
        value: '1',
        label: '1小时内(默认)'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '选项5',
        label: '48小时内'
      }],
      // 银行卡追加结算时间
      optionsSettlementBank: [{
        value: '1',
        label: '1小时'
      }, {
        value: '2',
        label: '2小时内'
      }, {
        value: '3',
        label: '3小时内'
      }, {
        value: '4',
        label: '4小时内'
      }, {
        value: '5',
        label: '5小时内'
      }, {
        value: '6',
        label: '6小时内'
      }, {
        value: '7',
        label: '7小时内'
      }, {
        value: '8',
        label: '8小时内'
      }, {
        value: '9',
        label: '9小时内'
      }, {
        value: '10',
        label: '10小时内'
      }, {
        value: '11',
        label: '11小时内'
      }, {
        value: '12',
        label: '12小时内'
      }, {
        value: '24',
        label: '24小时内'
      }, {
        value: '48',
        label: '48小时内'
      }],
      // 银行卡当面付授权接口版本
      optionsversionBank: [{
        value: 'V1',
        label: 'V1'
      }, {
        value: 'V2',
        label: 'V2'
      }, {
        value: 'V3',
        label: 'V3'
      }],
      // 微信防爆点击
      makesureWeixin: true,
      // 支付宝防爆点击
      makesureAlipay: true,
      // 银行防爆点击
      makesureBank: true
    };
  },
  methods: {
    addwayscase (type, storecode) {
      this.$router.push({
        name: 'payways-case-add',
        query: {
          type: type,
          store_code: storecode
        }
      });
    },
    open3 () {
      this.$prompt('输入当前账号登录密码，以便设置通道信息', '通道设置', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        inputPlaceholder: '请输入密码',
        inputType: 'password'
      })
      .then(() => {
        this.activeNames = ['2'];
      })
      .catch(action => {
        this.$message({
          type: 'info',
          message: action === 'cancel'
            ? '您点击了取消'
            : ''
        });
      });
    },
    deleteoptions () {
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning',
        center: true
      }).then(() => {
        this.$message({
          type: 'success',
          message: '删除成功!'
        });
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    // 修改支付通道实列
    modifyAlipay () {
      var that = this;
      if (!that.makesureAlipay) {
        return false;
      }
      that.makesureAlipay = false;
      that.fullscreenLoading2 = !that.fullscreenLoading2;
      new Promise((resolve, reject) => {
        if (that.apliayList.length > 0) {
          if (that.radio11 === '') {
            that.$message.error('支付宝通道为必选,不能为空');
            return false;
          }
          // 提交选中实列
          http.post(api.paywayTypeMain, {
            token: that.token,
            store_code: that.$route.query.store_code,
            type: 'g_alipay',
            ways_id: that.radio11
          }, (res) => {
            console.log(res);
            console.log(88);
            that.makesureAlipay = true;
            that.fullscreenLoading2 = !that.fullscreenLoading2;
            if (res.code === '10001' && res.status === 'SUCCESS') {
              resolve(1);
              return false;
            } else {
              that.$message.error(res.msg);
              that.makesureAlipay = true;
            }
            reject(2);
          }, () => {
            that.$message.error('网络错误，请稍候再试');
            that.fullscreenLoading2 = !that.fullscreenLoading2;
          });
        } else {
          resolve(1);
        }
      }).then((data) => {
        that.makesureAlipay = false;
        // 修改支付实列
        http.post(api.ruleSave, {
          token: that.token,
          saveType: 'type',
          fields: '',
          type: 'g_alipay',
          store_code: that.$route.query.store_code,
          payways_status: that.radio === true ? '1' : '0',
          receivables: that.radio1 === true ? '1' : '0',
          deposit_impower: that.radio2 === true ? '1' : '0',
          revoke_fundauth: that.radio3 === true ? '1' : '0',
          fundauth_pay: that.radio4 === true ? '1' : '0',
          ewn_impower: that.radio5 === true ? '1' : '0',
          tomorrow_settlement: that.radio6 === true ? '1' : '0',
          sms_pre_authorization: that.radio7 === true ? '1' : '0',
          refunt_status: that.radio8 === true ? '1' : '0',
          add_settlement: that.radio9 === true ? '1' : '0',
          add_settlement_time: that.settlementTime,
          refund_expiration_time: that.expirationTime,
          pre_authorization_expore: that.radio10,
          face_pay_interface_version: that.valueversion
        }, (res) => {
          console.log(res);
          console.log(that.radioway10);
          console.log(8889);
          that.fullscreenLoading2 = !that.fullscreenLoading2;
          if (res.code === '10001' && res.status === 'SUCCESS') {
            that.$message.success('支付宝通道状态修改成功');
            setTimeout(function () {
              that.makesureAlipay = true;
            }, 3000);
            return false;
          } else {
            that.$message.error(res.msg);
            that.makesureAlipay = true;
          }
        }, () => {
          that.$message.error('网络错误，请稍候再试');
          that.makesureAlipay = true;
          that.fullscreenLoading2 = !that.fullscreenLoading2;
        });
      }, (err) => {
        console.log(err);
      });
    },
    // 修改微信通道实列
    modifyWeixin () {
      var that = this;
      if (!that.makesureWeixin) {
        return false;
      }
      that.makesureWeixin = false;
      that.fullscreenLoading1 = !that.fullscreenLoading1;
      new Promise((resolve, reject) => {
        if (that.weixinList.length > 0) {
          if (that.radioweixin === '') {
            that.$message.error('微信通道为必选,不能为空');
            return false;
          }
          // 提交选中实列
          http.post(api.paywayTypeMain, {
            token: that.token,
            store_code: that.$route.query.store_code,
            type: 'g_weixin',
            ways_id: that.radioweixin
          }, (res) => {
            that.fullscreenLoading1 = !that.fullscreenLoading1;
            if (res.code === '10001' && res.status === 'SUCCESS') {
              resolve(1);
              return false;
            } else {
              that.$message.error(res.msg);
              that.makesureWeixin = true;
            }
            reject(2);
          }, () => {
            that.$message.error('网络错误，请稍候再试');
          });
        } else {
          resolve(1);
          console.log(1220);
          return false;
        }
      }).then((data) => {
        console.log(12205);
        that.makesureWeixin = false;
        // 修改微信通道实列
        http.post(api.ruleSave, {
          token: that.token,
          saveType: 'type',
          fields: '',
          type: 'g_weixin',
          store_code: that.$route.query.store_code,
          payways_status: that.radioWeixinAll === true ? '1' : '0',
          receivables: that.radioWeixin1 === true ? '1' : '0',
          deposit_impower: that.radioWeixin2 === true ? '1' : '0',
          revoke_fundauth: that.radioWeixin3 === true ? '1' : '0',
          fundauth_pay: that.radioWeixin4 === true ? '1' : '0',
          ewn_impower: that.radioWeixin5 === true ? '1' : '0',
          tomorrow_settlement: that.radioWeixin6 === true ? '1' : '0',
          sms_pre_authorization: that.radioWeixin7 === true ? '1' : '0',
          refunt_status: that.radioWeixin8 === true ? '1' : '0',
          add_settlement: that.radioWeixin9 === true ? '1' : '0',
          add_settlement_time: that.settlementTimeWeixin,
          refund_expiration_time: that.expirationTimeWeixin,
          pre_authorization_expore: that.radioway10,
          face_pay_interface_version: that.valueversionWeixin
        }, (res) => {
          console.log(res);
          console.log(that.radioway10);
          console.log(888);
          that.fullscreenLoading1 = !that.fullscreenLoading1;
          if (res.code === '10001' && res.status === 'SUCCESS') {
            that.$message.success('微信通道状态修改成功');
            setTimeout(function () {
              that.makesureWeixin = true;
            }, 3000);
            return false;
          } else {
            that.$message.error(res.msg);
            that.makesureWeixin = true;
          }
        }, () => {
          that.$message.error('网络错误，请稍候再试');
          that.makesureWeixin = true;
          that.fullscreenLoading1 = !that.fullscreenLoading1;
        });
      }, (err) => {
        console.log(err);
      });
    },
    // 修改银行卡通道实列
    modifyBank () {
      var that = this;
      if (!that.makesureBank) {
        return false;
      }
      that.makesureBank = false;
      that.fullscreenLoading3 = !that.fullscreenLoading3;
      new Promise((resolve, reject) => {
        if (that.bankList.length > 0) {
          // 提交选中实列
          http.post(api.paywayTypeMain, {
            token: that.token,
            store_code: that.$route.query.store_code,
            type: 'g_sfbank',
            ways_id: that.radioBank
          }, (res) => {
            console.log(res);
            console.log(55);
            that.fullscreenLoading3 = !that.fullscreenLoading3;
            if (res.code === '10001' && res.status === 'SUCCESS') {
              resolve(1);
              return false;
            } else {
              that.$message.error(res.msg);
              that.makesureBank = true;
            }
            reject(2);
          }, () => {
            that.$message.error('网络错误，请稍候再试');
            that.makesureBank = true;
          });
        } else {
          resolve(1);
          return false;
        }
      }).then((data) => {
        that.makesureBank = false;
        // 修改银行卡通道实列
        http.post(api.ruleSave, {
          token: that.token,
          saveType: 'type',
          fields: '',
          type: 'g_sfbank',
          store_code: that.$route.query.store_code,
          payways_status: that.radioBankAll === true ? '1' : '0',
          receivables: that.radioBank1 === true ? '1' : '0',
          deposit_impower: that.radioBank2 === true ? '1' : '0',
          revoke_fundauth: that.radioBank3 === true ? '1' : '0',
          fundauth_pay: that.radioBank4 === true ? '1' : '0',
          ewn_impower: that.radioBank5 === true ? '1' : '0',
          tomorrow_settlement: that.radioBank6 === true ? '1' : '0',
          sms_pre_authorization: that.radioBank7 === true ? '1' : '0',
          refunt_status: that.radioBank8 === true ? '1' : '0',
          add_settlement: that.radioBank9 === true ? '1' : '0',
          add_settlement_time: that.settlementTimeBank,
          refund_expiration_time: that.expirationTimeBank,
          pre_authorization_expore: that.radioBank10,
          face_pay_interface_version: that.valueversionBank
        }, (res) => {
          console.log(res);
          console.log(22);
          that.fullscreenLoading3 = !that.fullscreenLoading3;
          if (res.code === '10001' && res.status === 'SUCCESS') {
            that.$message.success('银行通道状态修改成功');
            setTimeout(function () {
              that.makesureBank = true;
            }, 3000);
            return false;
          } else {
            that.$message.error(res.msg);
            that.makesureBank = true;
          }
        }, () => {
          that.$message.error('网络错误，请稍候再试');
          that.makesureBank = true;
          that.fullscreenLoading3 = !that.fullscreenLoading3;
        });
      }, (err) => {
        console.log(err);
      });
    },
    selectWay (wayId, statusRadio) {
      wayId === this.radio11 ? this.radio11 = '' : this.radio11 = wayId;
      // console.log(this.radio11);
    },
    selectWayWeixin (wayId) {
      wayId === this.radioweixin ? this.radioweixin = '' : this.radioweixin = wayId;
      // console.log(this.radio11);
    },
    selectWayBank (wayId) {
      wayId === this.radioBank ? this.radioBank = '' : this.radioBank = wayId;
      // console.log(this.radio11);
    },
    apliayListWay () {
      var that = this;
      that.loading = true;
      // 获取所有支付通道实列接口
      http.post(api.queryWaysAll, {
        token: that.token,
        port: 'web',
        store_code: that.$route.query.store_code
      }, (res) => {
        console.log(res);
        console.log(99);
        if (res.code === '10001' && res.status === 'SUCCESS') {
          that.loading = false;
          // 获取支付宝列表
          that.apliayList = res.data[0].res.alipay;
          // 获取支付宝默认选中的值payways_
          that.apliayList.forEach(item => {
            if (item.is_default === 1) {
              this.radio11 = item.ways_id;
            }
          });
          // 获取微信列表
          that.weixinList = res.data[0].res.weixin;
          that.weixinList.forEach(item => {
            if (item.is_default === 1) {
              this.radioweixin = item.ways_id;
            }
          });
          // 获取银行列表
          that.bankList = res.data[0].res.sfbank;
          that.bankList.forEach(item => {
            if (item.is_default === 1) {
              this.radioBank = item.ways_id;
            }
          });
        } else {
          that.$message.error(res.msg);
          that.loading = false;
        }
      }, () => {
        that.$message.error('网络错误，请稍候再试');
        that.loading = false;
        console.log(11);
      });
    }
  },
  mounted: function () {
    var that = this;
    console.log(777);
    // 支付宝通道规则列表
    http.post(api.ruleList, {
      token: that.token,
      saveType: 'type',
      store_code: this.$route.query.store_code
    }, (res) => {
      console.log(res);
      console.log(6666);
      console.log(res.code);
      if (res.code === '10001' && res.status === 'SUCCESS') {
        // 获取支付通道列表状态
        var paywaysDate = res.data[0].result;
        if (paywaysDate.hasOwnProperty('g_alipay')) {
          that.paywaysList = res.data[0].result.g_alipay.payways_rules;
          console.log(that.paywaysList.payways_status);
          // 符合条件值为1通道状态开启
          if (that.paywaysList.payways_status === 1) {
            that.radio = true;
          }
          // 符合条件值为1收款状态开启
          if (that.paywaysList.receivables === 1) {
            that.radio1 = true;
          }
          // 符合条件值为1押金授权开启
          if (that.paywaysList.deposit_impower === 1) {
            that.radio2 = true;
          }
          // 符合条件值为1撤销预授权(解冻)开启
          if (that.paywaysList.revoke_fundauth === 1) {
            that.radio3 = true;
          }
          // 符合条件值为1结算状态开启
          if (that.paywaysList.fundauth_pay === 1) {
            that.radio4 = true;
          }
          // 符合条件值为1扫码授权开启
          if (that.paywaysList.ewn_impower === 1) {
            that.radio5 = true;
          }
          // 符合条件值为1隔日结算开启
          if (that.paywaysList.tomorrow_settlement === 1) {
            that.radio6 = true;
          }
          // 符合条件值为1短信预授权开启
          if (that.paywaysList.sms_pre_authorization === 1) {
            that.radio7 = true;
          }
          // 符合条件值为1退款开关开启
          if (that.paywaysList.refunt_status === 1) {
            that.radio8 = true;
          }
          // 符合条件值为1追加结算开启
          if (that.paywaysList.add_settlement === 1) {
            that.radio9 = true;
          }
          // 当面付预授权接口版本
          if (that.paywaysList.face_pay_interface_version === 'V1') {
            that.valueversion = 'V1';
          }
          if (that.paywaysList.face_pay_interface_version === 'V2') {
            that.valueversion = 'V2';
          }
          if (that.paywaysList.face_pay_interface_version === 'V3') {
            that.valueversion = 'V3';
          }
          // 预授权到期处理
          if (that.paywaysList.pre_authorization_expore === 1) {
            that.radio10 = '1';
          } else if (that.paywaysList.pre_authorization_expore === 2) {
            that.radio10 = '2';
          } else if (that.paywaysList.pre_authorization_expore === 3) {
            that.radio10 = '3';
          }
          // 支付宝退款时间
          if (that.paywaysList.refund_expiration_time === '1') {
            that.expirationTime = '1';
          } else if (that.paywaysList.refund_expiration_time === '2') {
            that.expirationTime = '2';
          } else if (that.paywaysList.refund_expiration_time === '3') {
            that.expirationTime = '3';
          } else if (that.paywaysList.refund_expiration_timee === '6') {
            that.expirationTime = '6';
          } else if (that.paywaysList.refund_expiration_time === '12') {
            that.expirationTime = '12';
          } else if (that.paywaysList.refund_expiration_time === '24') {
            that.expirationTime = '24';
          } else if (that.paywaysList.refund_expiration_time === '48') {
            that.expirationTime = '48';
          }
          // 支付宝追加结算时间
          if (that.paywaysList.add_settlement_time === '1') {
            that.settlementTime = '1';
          } else if (that.paywaysList.add_settlement_time === '2') {
            that.settlementTime = '2';
          } else if (that.paywaysList.add_settlement_time === '3') {
            that.settlementTime = '3';
          } else if (that.paywaysList.add_settlement_time === '4') {
            that.settlementTime = '4';
          } else if (that.paywaysList.add_settlement_time === '5') {
            that.settlementTime = '5';
          } else if (that.paywaysList.add_settlement_time === '6') {
            that.settlementTime = '6';
          } else if (that.paywaysList.add_settlement_time === '7') {
            that.settlementTime = '7';
          } else if (that.paywaysList.add_settlement_time === '8') {
            that.settlementTime = '8';
          } else if (that.paywaysList.add_settlement_time === '9') {
            that.settlementTime = '9';
          } else if (that.paywaysList.add_settlement_time === '10') {
            that.settlementTime = '10';
          } else if (that.paywaysList.add_settlement_time === '11') {
            that.settlementTime = '11';
          } else if (that.paywaysList.add_settlement_time === '12') {
            that.settlementTime = '12';
          } else if (that.paywaysList.add_settlement_time === '24') {
            that.settlementTime = '24';
          } else if (that.paywaysList.add_settlement_time === '48') {
            that.settlementTime = '48';
          }
        }
        // 是否存在微信g_weixin这个字段
        if (paywaysDate.hasOwnProperty('g_weixin')) {
          that.payweixinList = res.data[0].result.g_weixin.payways_rules;
          // 符合条件值为1通道状态开启
          if (that.payweixinList.payways_status === 1) {
            that.radioWeixinAll = true;
          }
          // 符合条件值为1收款状态开启
          if (that.payweixinList.receivables === 1) {
            that.radioWeixin1 = true;
          }
          // 符合条件值为1押金授权开启
          if (that.payweixinList.deposit_impower === 1) {
            that.radioWeixin2 = true;
          }
          // 符合条件值为1撤销预授权(解冻)开启
          if (that.payweixinList.revoke_fundauth === 1) {
            that.radioWeixin3 = true;
          }
          // 符合条件值为1结算状态开启
          if (that.payweixinList.fundauth_pay === 1) {
            that.radioWeixin4 = true;
          }
          // 符合条件值为1扫码授权开启
          if (that.payweixinList.ewn_impower === 1) {
            that.radioWeixin5 = true;
          }
          // 符合条件值为1隔日结算开启
          if (that.payweixinList.tomorrow_settlement === 1) {
            that.radioWeixin6 = true;
          }
          // 符合条件值为1短信预授权开启
          if (that.payweixinList.sms_pre_authorization === 1) {
            that.radioWeixin7 = true;
          }
          // 符合条件值为1退款开关开启
          if (that.payweixinList.refunt_status === 1) {
            that.radioWeixin8 = true;
          }
          // 符合条件值为1追加结算开启
          if (that.payweixinList.add_settlement === 1) {
            that.radioWeixin9 = true;
          }
          // 当面付预授权接口版本
          if (that.payweixinList.face_pay_interface_version === 'V1') {
            that.valueversionWeixin = 'V1';
          }
          if (that.payweixinList.face_pay_interface_version === 'V2') {
            that.valueversionWeixin = 'V2';
          }
          if (that.payweixinList.face_pay_interface_version === 'V3') {
            that.valueversionWeixin = 'V3';
          }
          // 预授权到期处理
          if (that.payweixinList.pre_authorization_expore === 1) {
            that.radioway10 = '1';
          }
          if (that.payweixinList.pre_authorization_expore === 2) {
            that.radioway10 = '2';
          }
          if (that.payweixinList.pre_authorization_expore === 3) {
            that.radioway10 = '3';
          }
          console.log(that.payweixinList.pre_authorization_expore);
          console.log(3333);
          // 微信退款时间
          if (that.payweixinList.refund_expiration_time === '1') {
            that.expirationTimeWeixin = '1';
          } else if (that.payweixinList.refund_expiration_time === '2') {
            that.expirationTimeWeixin = '2';
          } else if (that.payweixinList.refund_expiration_time === '3') {
            that.expirationTimeWeixin = '3';
          } else if (that.payweixinList.refund_expiration_timee === '6') {
            that.expirationTimeWeixin = '6';
          } else if (that.payweixinList.refund_expiration_time === '12') {
            that.expirationTimeWeixin = '12';
          } else if (that.payweixinList.refund_expiration_time === '24') {
            that.expirationTimeWeixin = '24';
          } else if (that.payweixinList.refund_expiration_time === '48') {
            that.expirationTimeWeixin = '48';
          }
          // 微信追加结算时间
          if (that.payweixinList.add_settlement_time === '1') {
            that.settlementTimeWeixin = '1';
          } else if (that.payweixinList.add_settlement_time === '2') {
            that.settlementTimeWeixin = '2';
          } else if (that.payweixinList.add_settlement_time === '3') {
            that.settlementTimeWeixin = '3';
          } else if (that.payweixinList.add_settlement_time === '4') {
            that.settlementTimeWeixin = '4';
          } else if (that.payweixinList.add_settlement_time === '5') {
            that.settlementTimeWeixin = '5';
          } else if (that.payweixinList.add_settlement_time === '6') {
            that.settlementTimeWeixin = '6';
          } else if (that.payweixinList.add_settlement_time === '7') {
            that.settlementTimeWeixin = '7';
          } else if (that.payweixinList.add_settlement_time === '8') {
            that.settlementTimeWeixin = '8';
          } else if (that.payweixinList.add_settlement_time === '9') {
            that.settlementTimeWeixin = '9';
          } else if (that.payweixinList.add_settlement_time === '10') {
            that.settlementTimeWeixin = '10';
          } else if (that.payweixinList.add_settlement_time === '11') {
            that.settlementTimeWeixin = '11';
          } else if (that.payweixinList.add_settlement_time === '12') {
            that.settlementTimeWeixin = '12';
          } else if (that.payweixinList.add_settlement_time === '24') {
            that.settlementTimeWeixin = '24';
          } else if (that.payweixinList.add_settlement_time === '48') {
            that.settlementTimeWeixin = '48';
          }
        }
        // 是否存在银行卡这个字段
        if (paywaysDate.hasOwnProperty('g_sfbank')) {
          that.payBankList = res.data[0].result.g_sfbank.payways_rules;
          // 符合条件值为1通道状态开启
          if (that.payBankList.payways_status === 1) {
            that.radioBankAll = true;
          }
          // 符合条件值为1收款状态开启
          if (that.payBankList.receivables === 1) {
            that.radioBank1 = true;
          }
          // 符合条件值为1押金授权开启
          if (that.payBankList.deposit_impower === 1) {
            that.radioBank2 = true;
          }
          // 符合条件值为1撤销预授权(解冻)开启
          if (that.payBankList.revoke_fundauth === 1) {
            that.radioBank3 = true;
          }
          // 符合条件值为1结算状态开启
          if (that.payBankList.fundauth_pay === 1) {
            that.radioBank4 = true;
          }
          // 符合条件值为1扫码授权开启
          if (that.payBankList.ewn_impower === 1) {
            that.radioBank5 = true;
          }
          // 符合条件值为1隔日结算开启
          if (that.payBankList.tomorrow_settlement === 1) {
            that.radioBank6 = true;
          }
          // 符合条件值为1短信预授权开启
          if (that.payBankList.sms_pre_authorization === 1) {
            that.radioBank7 = true;
          }
          // 符合条件值为1退款开关开启
          if (that.payBankList.refunt_status === 1) {
            that.radioBank8 = true;
          }
          // 符合条件值为1追加结算开启
          if (that.payBankList.add_settlement === 1) {
            that.radioBank9 = true;
          }
          // 当面付预授权接口版本
          if (that.payBankList.face_pay_interface_version === 'V1') {
            that.valueversionBank = 'V1';
          }
          if (that.payBankList.face_pay_interface_version === 'V2') {
            that.valueversionBank = 'V2';
          }
          if (that.payBankList.face_pay_interface_version === 'V3') {
            that.valueversionBank = 'V3';
          }
          // 预授权到期处理
          if (that.payBankList.pre_authorization_expore === 1) {
            that.radioBank10 = '1';
          } else if (that.payBankList.pre_authorization_expore === 2) {
            that.radioBank10 = '2';
          } else if (that.payBankList.pre_authorization_expore === 3) {
            that.radioBank10 = '3';
          }
          // 银行卡退款时间
          if (that.payBankList.refund_expiration_time === '1') {
            that.expirationTimeBank = '1';
          } else if (that.payBankList.refund_expiration_time === '2') {
            that.expirationTimeBank = '2';
          } else if (that.payBankList.refund_expiration_time === '3') {
            that.expirationTimeBank = '3';
          } else if (that.payBankList.refund_expiration_timee === '6') {
            that.expirationTimeBank = '6';
          } else if (that.payBankList.refund_expiration_time === '12') {
            that.expirationTimeBank = '12';
          } else if (that.payBankList.refund_expiration_time === '24') {
            that.expirationTimeBank = '24';
          } else if (that.payBankList.refund_expiration_time === '48') {
            that.expirationTimeBank = '48';
          }
          // 银行卡追加结算时间
          if (that.payBankList.add_settlement_time === '1') {
            that.settlementTimeBank = '1';
          } else if (that.payBankList.add_settlement_time === '2') {
            that.settlementTimeBank = '2';
          } else if (that.payBankList.add_settlement_time === '3') {
            that.settlementTimeBank = '3';
          } else if (that.payBankList.add_settlement_time === '4') {
            that.settlementTimeBank = '4';
          } else if (that.payBankList.add_settlement_time === '5') {
            that.settlementTimeBank = '5';
          } else if (that.payBankList.add_settlement_time === '6') {
            that.settlementTimeBank = '6';
          } else if (that.payBankList.add_settlement_time === '7') {
            that.settlementTimeBank = '7';
          } else if (that.payBankList.add_settlement_time === '8') {
            that.settlementTimeBank = '8';
          } else if (that.payBankList.add_settlement_time === '9') {
            that.settlementTimeBank = '9';
          } else if (that.payBankList.add_settlement_time === '10') {
            that.settlementTimeBank = '10';
          } else if (that.payBankList.add_settlement_time === '11') {
            that.settlementTimeBank = '11';
          } else if (that.payBankList.add_settlement_time === '12') {
            that.settlementTimeBank = '12';
          } else if (that.payBankList.add_settlement_time === '24') {
            that.settlementTimeBank = '24';
          } else if (that.payBankList.add_settlement_time === '48') {
            that.settlementTimeBank = '48';
          }
        }
      }
    }, (err) => {
      console.log(err);
      that.$message.error('网络错误，请稍候再试');
    });
    // 获取所有通道下的列表
    that.apliayListWay();
  }
};
</script>

<style lang="stylus" scoped>
@import url('./payment.css');
.payment
  .paycontent
    margin: 10px 0
    padding:0 10px
    box-sizing:border-box
    background-color:#fff
    box-shadow: 1px 1px 1px #999
    font-size:14px
    color:#333
  .bluefont
    a
      color: #409EFF
      text-decoration: underline
  .title
    padding:20px 0px 15px 0px
    box-sizing:border-box
    font-size:16px
    color:#999
  .leftline
    width:5px;
    height:15px;
    display:inline-block
    background:#36ADCB
    margin-right:5px
  .set
    float:right
    color:#333
    font-size:14px
    img
      width:13px
      height:12px
      margin-right:5px
  .bt-line
    border-bottom:1px solid #d8d8d8
  .topline
    border-top:1px solid #d8d8d8 
  .pass-main-title
    padding:20px 0
    box-sizing:border-box 
    font-size:14px
    color:#666 
  .pass-main
    padding-top:20px
    box-sizing:border-box 
    font-size:14px
    color:#666
  .el-radio
    color:#999
  .el-select
    width:100px
    height:20px
  .ml20
    margin-left:20px
  .form-all
    color:#333
    font-size:14px
  .form-title
    height:30px
    line-height:30px
  .form-content
    height:50px
    line-height:50px
    border-bottom:1px solid #d8d8d8
  .el-input
    width:75%
  .no-lineheight
    padding-top:5px
    box-sizing:border-box
    line-height:0px
  .partone
    padding-bottom:20px
    box-sizing:border-box
  .commonedit
    margin-left:5px
    margin-right:5px
  .redfont
    color:#FF4D4F
  .orangefont
    color:#FF7A45
  .bluefont
    color:#409EFF
  .pass-line
    padding:15px 0
    box-sizing:border-box
    font-size:14px
    text-decoration:underline
    color:#409EFF
  .bottom-btn
    margin-top:30px
  .el-icon-arrow-right
    display:none
  .el-collapse-item__arrow
    display:none
  .mt20
    margin-top:20px
  .pb20
    padding-bottom:20px


  
  
 

</style>
